package queation11;

import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static int minTime(int[] arr, int i) {
        int result = 0;
        while(arr[i] != 0) {
            for (int j = 0; j < arr.length; j++) {
                if (arr[j] == 0) {
                    continue;
                }
                arr[j]--;
                result++;
                if (arr[i] == 0) {
                    return result;
                }
            }
        }
        return result;
    }

    public static void main(String[] args) {
//        int[] arr = {2,3,2};
//        System.out.println(minTime(arr, 2));
        Scanner scanner = new Scanner(System.in);
        String[] arrStr = scanner.nextLine().split(" ");
        int[] arr = Arrays.stream(arrStr).map(Integer::valueOf).mapToInt(Integer::intValue).toArray();
    }
}
